﻿@{
    var xml = Model.Data as System.Xml.Linq.XElement;
}

<div class="report">
    @foreach(var i in xml.Elements("storage"))
    {
        <table class="key-value">
            <thead>
                <tr>
                    <th colspan="2">@i.Attribute("name").Value</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>Type</td>
                    <td>@i.Attribute("type").Value</td>
                </tr>
                @foreach(var j in i.Elements("param"))
                {
                    <tr>
                        <td>@j.Attribute("key").Value</td>
                        <td>@j.Value</td>
                    </tr>
                }
            </tbody>
        </table>
    }
    <table class="key-value">
        <thead>
            <tr>
                <th colspan="2">Statistics</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>File Size Summary</td>
                <td>@xml.Element("stat").Attribute("fileSizeSum").Value</td>
            </tr>
            <tr>
                <td>File Count</td>
                <td>@xml.Element("stat").Attribute("fileTotalNum").Value</td>
            </tr>
            <tr>
                <td>Quota Allocated Summary</td>
                <td>@xml.Element("stat").Attribute("quotaAllocSum").Value</td>
            </tr>
        </tbody>
    </table>
</div>